package com.suzhiliang.springbootlesson.mybatisToCRUD;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Copyright (C), 2015-2018, XXX有限公司
 *
 * @ClassName: UserController
 * @Author: xmm
 * @Date: 2018/10/25 16:48
 * @Description: 控制层代码
 * @Version 1.0
 */
@Controller
@RequestMapping(value = "mybatisUserController")
public class UserController {
    @Autowired
    private MybatisUserService mybatisUserService;

    @ResponseBody
    @RequestMapping(value = "findAllUser",method = RequestMethod.GET)
    public List<User> findAllUser(int pageNum, int pageSize){

        return mybatisUserService.findAllUser(pageNum,pageSize);
    }

}
